package Libray;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: xwl
 * Date: 2023-04-16
 * Time: 0:20
 */
public class BookShelf {
    // 定义书架大小
    private static final int DEFAULT_SIZE = 10;
    // 定义书架
    private Book[] books = new Book[DEFAULT_SIZE];
    // 定义书的数目
    private int bookNum = 3;
    // 构造方法初始化
    public BookShelf() {
        books[0] = new Book("三国演义","罗贯中",2010,1,10,false);
        books[1] = new Book("水浒传","施耐庵",2011,2,20,false);
        books[2] = new Book("红楼梦","曹雪芹",2012,3,30,false);
        this.bookNum = 3;
    }
    // get/set


    public Book[] getBooks() {
        return books;
    }

    public void setBooks(Book[] books) {
        this.books = books;
    }

    public int getBookNum() {
        return bookNum;
    }

    public void setBookNum(int bookNum) {
        this.bookNum = bookNum;
    }
}
